<?php  
header("content-type:text/html;charset=utf-8");
require_once('./admin/View/inc_admin.php')
?> 
<div id="content">
 <div class="inner" style="min-height:1200px;">
  <div class="row">
    <div class="col-lg-16">
      <html lang="en">
      <center><h3>视频列表</h3></center>

      <div class="container-fluid col-md-offset-1 col-md-10">
        <table align="center"  class="table table-striped"> 
          <tr>
            <th>序号</th>
            <th>视频名称</th>
            <th>类别</th>
            <th>添加时间</th>
            <th width='100'>海报</th>
            <th>简介</th>
            <th>下载地址</th>
                <th>操作 <a href="index.php?c=video&m=videoform">添加</a></th>
          </tr>

          <?php
          foreach ($data['videos'] as $row) {
           echo '<tr>';
           echo'<td>'.$row['vid'].'</td>';
           echo'<td>'.$row['videoname'].'</td>';
           switch($row['tid']){
            case '2':$dg="电影";break;
            case '3':$dg="动画片";break;
            case '9':$dg="原创";break;
            case '11':$dg="纪录片";break;
            case '12':$dg="电视剧";break;
          }
          echo'<td>'.$dg.'</td>';
          echo'<td>'.$row['downtimes'].'</td>';
          echo'<td align="center"><img src="upload1/'.$row['pic'].'" width=60 height=80 alt="无头像"></td>';
          echo'<td>'.$row['intro'].'</td>';

          echo'<td>'.$row['address'].'</td>';	 
          echo '<td><a href="index.php?c=video&m=videomod&id='.$row['vid'].' "><button type="button" class="btn btn-default ">修改</button></a>
          <a href="index.php?c=video&m=delete1&id='.$row['vid'].'" onClick="return confirm(\'确定要删除吗？\');"><button type="button" class="btn btn-default ">删除</button></a></td>';
          echo '</tr>';  
        }
        echo '</table>';  
        $totalrows = count($data['videos']);
        echo "<table align='center'><tr><td>共有{$totalrows}个视频</td></tr></table>";   
        ?>

      </div>
    </div>

    <hr />
  </div>
  </div>
</div>
<script src="./admin/View/assets/plugins/jquery-2.0.3.min.js"></script>
<script src="./admin/View/assets/plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="./admin/View/assets/plugins/modernizr-2.6.2-respond-1.1.0.min.js"></script>
</body>          
